package sfeir.gwt.ergosoom.client;

import sfeir.gwt.ergosoom.client.model.Profile;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("client")
public interface ClientApi extends RemoteService {

    public Profile getProfile(String email) throws NotLoggedInException;
    public Long createProfile(Profile p) throws NotLoggedInException;
    public Boolean checkAlias(String alias) throws NotLoggedInException;
    
    public Profile login(String login, String password, Boolean encodePass) throws NotLoggedInException;
    public Profile signup(Profile profile) throws NotLoggedInException;
    
    @SuppressWarnings("serial")
    public static class NotLoggedInException extends Exception {
    }
}
